import QtQuick 2.12
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.12


ToolButton{
    property string iconSource
    property int iconWidth
    property int iconHeight
    id:rect
    width:32
    height:32
    icon.source: iconSource
    icon.width: iconWidth
    icon.height: iconHeight
    MouseArea{
        anchors.fill: parent;
        hoverEnabled: true;
        onEntered: {    //鼠标移入
            rect.icon.color = "orange";
        }
        onExited: {
            rect.icon.color = "grey";
        }
    }
    onClicked: {
        console.log("!1")
    }

    background: Rectangle{
        color:"#00000000"
    }

}
